import request from "@/utils/request";
import { PayrollSettigForm, CheckinWageStatusSettingEditForm ,WageMonthAmountSettingsEditForm} from "./types";

/**
 * 工资单限额获取
 */
export function getPayrollSetting() {
  return request({
    url: "api/v1/setting/getpayrollSetting",
    method: "get",
  });
}

/**
 * 工资单限额设置
 */
export function setPayrollSetting(data: Array<PayrollSettigForm>) {
  return request({
    url: "api/v1/setting/setpayrollSetting",
    method: "post",
    data: data,
  });
}

/**
 * 考勤配置获取
 */
export function getAttendanceSetting() {
  return request({
    url: "api/v1/setting/getCheckinSetting",
    method: "get",
  });
}

/**
 * 考勤配置设置
 */
export function setAttendanceSetting(data: PayrollSettigForm) {
  return request({
    url: "api/v1/setting/setCheckinSetting",
    method: "post",
    data: data,
  });
}

/**
 * 考勤代发状态设置获取
 */
export function getCheckinWageSetting() {
  return request({
    url: "api/v1/setting/getCheckinWageSetting",
    method: "get",
  });
}

/**
 * 考勤代发状态设置设置
 */
export function setCheckinWageSetting(data: CheckinWageStatusSettingEditForm) {
  return request({
    url: "api/v1/setting/setCheckinWageSetting",
    method: "post",
    data: data,
  });
}
/**
 * 人员月度工资单限额获取
 */
export function getWageMonthAmountSettings() {
  return request({
    url: "api/v1/setting/getWageMonthAmountSettings",
    method: "get",
  });
}

/**
 * 人员月度工资单限额设置
 */
export function setWageMonthAmountSettings(data: WageMonthAmountSettingsEditForm ) {
  return request({
    url: "api/v1/setting/setWageMonthAmountSettings",
    method: "post",
    data: data,
  });
}